<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListEstacaoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <!--<h:form id="form" styleClass="jsfcrud_list_form">-->
                <p:growl id="messages" life="3000"/>

                <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
                </h:panelGroup>  
                <ui:remove >
                    <h:commandLink action="#{estacaoController.prepareCreate}" value="#{bundle.ListEstacaoCreateLink}"/>
                    <br />     
                </ui:remove>       
                <h:panelGroup>

                    <p:dataTable value="#{estacaoController.lista}" var="item"  paginator="true" rows="10"
                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                 rowsPerPageTemplate="5,10,15,20" rowKey="#{item.estId}" paginatorPosition="both" emptyMessage="#{bundle.ListEstacaoEmpty}" selection="#{estacaoController.selectedEstacao}" selectionMode="single">

                        <p:column styleClass="firstColumn" filterBy="#{item.estId}" sortBy="#{item.estId}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEstacaoTitle_estId}"/>
                            </f:facet>
                            <h:outputText value="#{item.estId}"/>
                        </p:column>
                        <p:column filterBy="#{item.estNm}" sortBy="#{item.estNm}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEstacaoTitle_estNm}"/>
                            </f:facet>
                            <h:outputText value="#{item.estNm}"/>
                        </p:column>
                        <p:column filterBy="#{item.estCdPlu}" sortBy="#{item.estCdPlu}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEstacaoTitle_estCdPlu}"/>
                            </f:facet>
                            <h:outputText value="#{item.estCdPlu}"/>
                        </p:column>
                        <p:column filterBy="#{item.estCdFlu}" sortBy="#{item.estCdFlu}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListEstacaoTitle_estCdFlu}"/>
                            </f:facet>
                            <h:outputText value="#{item.estCdFlu}"/>
                        </p:column>
                        <ui:remove>
                            <p:column filterBy="#{item.estIcCampanha}" sortBy="#{item.estIcCampanha}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estIcCampanha}"/>
                                </f:facet>
                                <h:outputText value="#{item.estIcCampanha}"/>
                            </p:column>
                            <p:column filterBy="#{item.estCdAdicionalestado}" sortBy="#{item.estCdAdicionalestado}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estCdAdicionalestado}"/>
                                </f:facet>
                                <h:outputText value="#{item.estCdAdicionalestado}"/>
                            </p:column>
                            <p:column filterBy="#{item.estStrId}" sortBy="#{item.estStrId}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estStrId}"/>
                                </f:facet>
                                <h:outputText value="#{item.estStrId}"/>
                            </p:column>
                            <p:column filterBy="#{item.estCdIgpontopoligono}" sortBy="#{item.estCdIgpontopoligono}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estCdIgpontopoligono}"/>
                                </f:facet>
                                <h:outputText value="#{item.estCdIgpontopoligono}"/>
                            </p:column>
                            <p:column filterBy="#{item.estCdIgpontolinha}" sortBy="#{item.estCdIgpontolinha}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estCdIgpontolinha}"/>
                                </f:facet>
                                <h:outputText value="#{item.estCdIgpontolinha}"/>
                            </p:column>
                            <p:column filterBy="#{item.estCdIggeometria}" sortBy="#{item.estCdIggeometria}">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListEstacaoTitle_estCdIggeometria}"/>
                                </f:facet>
                                <h:outputText value="#{item.estCdIggeometria}"/>
                            </p:column>
                        </ui:remove>
                        <f:facet name="footer">
                            <p:commandButton id="viewCommand" value="#{bundle.MsgVisualizar}" icon="ui-icon-search"  update=":formList:displayView" oncomplete="estacaoDialogView.show()" />                        
                        </f:facet>
                    </p:dataTable>                


                    <p:dialog id="dialogView" header="#{bundle.EstacaoDialogView_header}" widgetVar="estacaoDialogView" resizable="false"
                              width="500" >

                        <h:panelGrid id="displayView" columns="2" cellpadding="4">                          

                            <h:outputText value="#{bundle.ViewEstacaoLabel_estId}"/>
                            <h:outputText value="#{estacaoController.selected.estId}" title="#{bundle.ViewEstacaoTitle_estId}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estNm}"/>
                            <h:outputText value="#{estacaoController.selected.estNm}" title="#{bundle.ViewEstacaoTitle_estNm}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdPlu}"/>
                            <h:outputText value="#{estacaoController.selected.estCdPlu}" title="#{bundle.ViewEstacaoTitle_estCdPlu}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdFlu}"/>
                            <h:outputText value="#{estacaoController.selected.estCdFlu}" title="#{bundle.ViewEstacaoTitle_estCdFlu}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estIcCampanha}"/>
                            <h:outputText value="#{estacaoController.selected.estIcCampanha}" title="#{bundle.ViewEstacaoTitle_estIcCampanha}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdAdicionalestado}"/>
                            <h:outputText value="#{estacaoController.selected.estCdAdicionalestado}" title="#{bundle.ViewEstacaoTitle_estCdAdicionalestado}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estStrId}"/>
                            <h:outputText value="#{estacaoController.selected.estStrId}" title="#{bundle.ViewEstacaoTitle_estStrId}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdIgpontopoligono}"/>
                            <h:outputText value="#{estacaoController.selected.estCdIgpontopoligono}" title="#{bundle.ViewEstacaoTitle_estCdIgpontopoligono}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdIgpontolinha}"/>
                            <h:outputText value="#{estacaoController.selected.estCdIgpontolinha}" title="#{bundle.ViewEstacaoTitle_estCdIgpontolinha}"/>
                            <h:outputText value="#{bundle.ViewEstacaoLabel_estCdIggeometria}"/>
                            <h:outputText value="#{estacaoController.selected.estCdIggeometria}" title="#{bundle.ViewEstacaoTitle_estCdIggeometria}"/>
                        </h:panelGrid>
                    </p:dialog>
                </h:panelGroup>
            <!--</h:form>-->
        </ui:define>
    </ui:composition>

</html>
